//
// Created by xujingyi on 2021/4/28.
//

#ifndef ALLIANCE_SENTRY_V2_0_SENTRYTHREAD_H
#define ALLIANCE_SENTRY_V2_0_SENTRYTHREAD_H

//#define DO_NOT_CNT_TIME

#include <iostream>
#include <deque>
#include <thread>
#include <mutex>
#include <condition_variable>
#include <opencv2/core/core.hpp>
#include "Serial.h"
#include "options.h"
#include "camera/wrapper_head.h"
#include "camera/video_wrapper.h"
#include "camera/camera_wrapper.h"
//#include "constants.h"
#include "additions.h"
#include "log.h"
#include "systime.h"
#include "armor_finder.h"
//#include "armor_finder/solve_position/solve_PNP.h"
//#include "armor_finder/predict_position/predict_PNP.h"
//#include "armor_finder/predict_position/predict_pixel.h"
//#include "armor_finder/predict_position/smooth.h"
//#include <show_images/show_images.h>
#include "Setter.h"
/*!
 * 相机取图线程
 * @param tempSetter
 * @param tempVideo
 */
void shoot2CameraBuffer(rm::Setter &tempSetter,WrapperHead *&tempVideo);
/*!
 * 复制图像到CPU
 * @param tempSetter
 * @param tempVideo
 */
void transport2CPUBuffer(rm::Setter &tempSetter,WrapperHead *&tempVideo);
/*!
 * 读取串口线程
 * @param tempSerial
 */
/*!
 * 哨兵模式主线程
 * @param tempSetter
 * @param tempVideo
 * @param tempSerial
 * @param enemy_color
 */
void sentryFight(rm::Setter &tempSetter,WrapperHead *&tempVideo ,Serial &tempSerial,const int enemy_color);
/*!
 * 显示图像线程
 * @param tempSetter
 */
void imageShow(rm::Setter &tempSetter);

#endif //ALLIANCE_SENTRY_V2_0_SENTRYTHREAD_H
